1. Field of the Invention
The present invention relates to a system and method for display control, and particularly to a system and method for display control in which full-scene anti-aliasing and stereo three-dimensional display can be achieved either individually or simultaneously.
2. Description of the Related Art
In an image display system, system developers always desire to repair images to obtain perfect images on display monitors. Full-scene anti-aliasing (FSAA) is a technique to remove unpleasant jaggy effect for a rendered 3D (three-dimensional) scene. Conventional techniques use super-sampling or an accumulation buffer to remove the aliasing edges.
Super-sampling requires less change to the current hardware architecture. However, it consumes a large number of memory buffers to store super-sampled pixels and then filter them to obtain in an anti-aliased scene. Accumulation buffers requires several passes to render and accumulate jittered objects. A proper blending is also required to obtain the final color for each pixel during an accumulation process.
In addition, stereo 3D display is another technique to achieve stereoscopic effect with the aid of current hardware support. Based on the parameters that define a parallax, 3D objects are rendered to left and right buffers with horizontal shift differences. The left buffer and right buffer correspond to the left-eye view and right-eye view, respectively. The left and right buffer images are displayed alternatively. An external device, such as shutter glasses, is required to guarantee the left eye sees only the left buffer image and the right eye sees only the right buffer image. As long as the switching is fast enough, the human visual system will not distinguish the alternative process, and the stereoscopic effect is perceived.
However, the hardware circuits for FSAA and stereo 3D display are independent in conventional image display system. Thus, there is a lack of a proper method in display control for both FSAA and stereo 3D and a mechanism for combining stereo offsets and jitter offsets.
It is therefore an object of the present invention to provide a system and method for display control in which full-scene anti-aliasing and stereo three-dimensional display can be achieved either individually or simultaneously.
To achieve the above objects, the present invention provides a system and method for full-scene anti-aliasing and stereo three-dimensional display control. According to one embodiment of the invention, the system for full-scene anti-aliasing and stereo three-dimensional display control includes a receiving buffer, a geometry offset generator, a rendering engine, and a blending engine.
The receiving buffer receives a geometry to be processed. The geometry offset generator receives stereo parameters corresponding to a stereo effect and FSAA parameters corresponding to a FSAA effect, calculates a first stereo offset and a second stereo offset of the geometry according to the stereo parameters, and calculates a first FSAA offset and a second FSAA offset of the geometry according to the FSAA parameters.
The rendering engine combines the first stereo offset and second stereo offset with the first FSAA offset respectively to obtain a first new offset and a second new offset, combines the first stereo offset and second stereo offset with the second FSAA offset respectively to obtain a third new offset and a fourth new offset, and re-renders the geometry according to the first new offset, second new offset, third new offset, and fourth new offset respectively, so as to obtain a first new geometry, a second new geometry, a third new geometry, and a fourth new geometry.
The blending engine blends the first new geometry and the third new geometry to obtain a first display geometry, and blends the second new geometry and the fourth new geometry to obtain a second display geometry.
According to the embodiment of the invention, the system further includes a first buffer and a second buffer to store the first display geometry and the second display geometry respectively.
According to the embodiment of the invention, the system further includes a fetch unit to fetch the first display geometry and the second display geometry from the first buffer and the second buffer, and display the first display geometry and the second display geometry sequentially.
Further, according to a second embodiment of the invention, a method for full-scene anti-aliasing and stereo three-dimensional display control is provided. First, a geometry and stereo parameters corresponding to a stereo effect and FSAA parameters corresponding to a FSAA effect are received. Then, a first stereo offset and a second stereo offset of the geometry are calculated according to the stereo parameters, and a first FSAA offset and a second FSAA offset of the geometry are calculated according to the FSAA parameters.
Then, the first stereo offset and second stereo offset are combined with the first FSAA offset respectively to obtain a first new offset and a second new offset, and the first stereo offset and second stereo offset are combined with the second FSAA offset respectively to obtain a third new offset and a fourth new offset.
Thereafter, the geometry is re-rendered according to the first new offset, second new offset, third new offset, and fourth new offset respectively, so as to obtain a first new geometry, a second new geometry, a third new geometry, and a fourth new geometry.
Finally, the first new geometry and the third new geometry are blended to obtain a first display geometry, and the second new geometry and the fourth new geometry are blended to obtain a second display geometry.
According to the embodiment of the invention, the method further stores the first display geometry and the second display geometry to a first buffer and a second buffer respectively. The method further fetches the first display geometry and the second display geometry from the first buffer and the second buffer, and displays the first display geometry and the second display geometry sequentially.